import {Api} from '@/api/type'
import ApiCommon from '@/api/common'
import {BaseApi} from '@/api/base-api'

type R<T> = Api.Common.R<T>;
type Data = Api.System.User;

export class UserApi extends BaseApi<Data> {
    constructor() {
        super('user')
    }

    /**
     * 批量修改用户部门
     * @param deptId 部门ID
     * @param userId 用户ID数组
     */
    async batchModifyUserDept<T = R<boolean>>(deptId: string, userId: Array<string>): Promise<T> {
        return await ApiCommon.request.post<T>('system/user/batch-modify-user-dept', {
            deptId: deptId,
            userId: userId
        })
    }

}

